home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / blix / haeberlifont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.9 KB  |  63 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. typedef struct Bitmap {
  18.        short *base;         /* pointer to first word */
  19.     short xsize, ysize;    /* dimensions of the bitmap */
  20.     short xorig, yorig;    /* origin - used for cursors */
  21.     short xmove, ymove;    /* move - used by characters */
  22.     short sper;        /* shorts per row */
  23. } Bitmap;
  24.  
  25. typedef struct glyph {
  26.      float cscale, angle;
  27.      float movex, movey;
  28.      Bitmap *bm0;
  29.      Bitmap *bm1;
  30. } glyph;
  31.  
  32. typedef struct edge {
  33.     struct edge *next;
  34.     float ymax;
  35.     float ymin;
  36.     float x, y;
  37.     float dxdy;
  38. } Edge;    
  39.  
  40. typedef struct chardesc {
  41.     short movex, movey;        /* advance */
  42.     short llx, lly;        /* bounding box */
  43.     short urx, ury;
  44.     short *data;        /* char data */
  45.     long datalen;        
  46. } chardesc;
  47.  
  48. typedef struct objfnt {
  49.     struct objfnt *freeaddr;    /* if freeaddr != 0, objfnt is one chunck */
  50.     short type;
  51.     short charmin, charmax;
  52.     short nchars;
  53.     short scale;
  54.     chardesc *chars;
  55. } objfnt;
  56.  
  57. objfnt *readobjfnt(char *name);
  58. void drawaafntchar(objfnt *fnt, int c);
  59. void aafontsetsize(objfnt *fnt, float pixhigh);
  60. void aafontmoveto(float xpos, float ypos);
  61. void get_charpos(float *x, float *y);
  62. void charsetcolors(long col1, long col2);
  63.